/**
 * 
 */
package jm.lib.collections.list;

import java.util.List;

/**
 * Because JSF and JSTL treat list as special data type and the properties 
 * of list/map cannot be gotten by Bean rule, this is a helper class for 
 * JSF/JSTL to access PageSize and Size properties of PageList 
 * @author JimingLiu
 *
 */
public class PageListWrapper<T> {
	private PageList<T> list;
	
	public PageListWrapper(PageList<T> list) {
		this.list = list;
	}
	
	public PageListWrapper(List<T> pageItems, int totalItemsCount, int startIndex, int pageSize) {
		this.list = new PageList<T>(pageItems, totalItemsCount, startIndex, pageSize);
	}
	
	public PageList<T> getList() {
		return list;
	}

	public int getPageSize() {
		return list.getPageSize();
	}

	public int getSize() {
		return list.size();
	}
}
